package com.codesuc.aichat;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.annotation.PropertySource;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @Author: ZhangGongMing
 * @CreateTime: 2025/9/23 00:20
 * @description: 启动类
 * @Version: 1.0
 */
@ServletComponentScan
@SpringBootApplication
@EnableTransactionManagement  // 允许开启事务
@EnableAsync  // 开启异步支持
@EnableScheduling  // 开启任务调度支持
@MapperScan("com.codesuc.aichat.**.mapper")
@EnableConfigurationProperties
@PropertySource("classpath:ai-config.properties")
public class AiChatRolesApplication {

    public static void main(String[] args) {
        SpringApplication.run(AiChatRolesApplication.class, args);
    }

}